export function useTable() {
    const gridOptions = reactive<any>({
        border: true,
        columnConfig: {
            resizable: true,
        },
        columns: [
            { slots: { default: 'accountNumber' }, title: '开户账户', width: 300 },
            { field: 'bankName', title: '开户行' },
            { field: 'accountName', title: '开户名' },
            { field: 'createBy', title: '创建人' },
            { field: 'createTime', title: '创建时间' },
            { slots: { default: 'operate' }, title: '操作', width: 200 },
        ],
        data: [],
        editConfig: {
            mode: 'row',
            showStatus: true,
            trigger: 'manual',
        },
        height: 530,
        keepSource: true,
        pagerConfig: {
            currentPage: 1,
            enabled: true,
            pageSize: 10,
            pageSizes: [10, 20, 50, 100, 200, 500],
            total: 0,
        },
        showOverflow: true,
        toolbarConfig: {
            slots: {
                buttons: 'toolbar_buttons',
            },
        },
    })

    const btns = [
        {
            label: '编辑',
            text: true,
            value: 'edit',
        },
        {
            label: '删除',
            text: true,
            value: 'delete',
        },
    ]

    return { btns, gridOptions }
}
